package org.woodwhale.poi.pojo;

import java.util.List;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelCollection;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ExcelTarget("courseEntity")
public class CourseEntity implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
	
	/** 主键 */
	private String id;
	
	/** 课程名称 */
	@Excel(name = "课程名称", orderNum = "1", width = 25, needMerge=true)
	private String name;
	
	/** 老师主键 */
	@ExcelEntity(id = "absent")
	private TeacherEntity mathTeacher;

	@ExcelCollection(name = "学生", orderNum = "4")
	private List<StudentEntity> students;

	public CourseEntity(String id, String name, TeacherEntity mathTeacher) {
		super();
		this.id = id;
		this.name = name;
		this.mathTeacher = mathTeacher;
	}
}
